/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package podologia.beansDB;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Hernan
 */
@Entity
@Table(name = "diaexcepcion")
@NamedQueries({@NamedQuery(name = "Diaexcepcion.findByIdDiaExcepcion", query = "SELECT d FROM Diaexcepcion d WHERE d.idDiaExcepcion = :idDiaExcepcion"), @NamedQuery(name = "Diaexcepcion.findByFechaInicio", query = "SELECT d FROM Diaexcepcion d WHERE d.fechaInicio = :fechaInicio"), @NamedQuery(name = "Diaexcepcion.findByFechaFin", query = "SELECT d FROM Diaexcepcion d WHERE d.fechaFin = :fechaFin")})
public class Diaexcepcion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "idDiaExcepcion", nullable = false)
    private Integer idDiaExcepcion;
    @Column(name = "fechaInicio")
    private Integer fechaInicio;
    @Column(name = "fechaFin")
    private Integer fechaFin;
    @JoinColumn(name = "idEmpleado", referencedColumnName = "legajo")
    @ManyToOne
    private Empleado idEmpleado;

    public Diaexcepcion() {
    }

    public Diaexcepcion(Integer idDiaExcepcion) {
        this.idDiaExcepcion = idDiaExcepcion;
    }

    public Integer getIdDiaExcepcion() {
        return idDiaExcepcion;
    }

    public void setIdDiaExcepcion(Integer idDiaExcepcion) {
        this.idDiaExcepcion = idDiaExcepcion;
    }

    public Integer getFechaInicio() {
        return fechaInicio;
    }

    public void setFechaInicio(Integer fechaInicio) {
        this.fechaInicio = fechaInicio;
    }

    public Integer getFechaFin() {
        return fechaFin;
    }

    public void setFechaFin(Integer fechaFin) {
        this.fechaFin = fechaFin;
    }

    public Empleado getIdEmpleado() {
        return idEmpleado;
    }

    public void setIdEmpleado(Empleado idEmpleado) {
        this.idEmpleado = idEmpleado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idDiaExcepcion != null ? idDiaExcepcion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Diaexcepcion)) {
            return false;
        }
        Diaexcepcion other = (Diaexcepcion) object;
        if ((this.idDiaExcepcion == null && other.idDiaExcepcion != null) || (this.idDiaExcepcion != null && !this.idDiaExcepcion.equals(other.idDiaExcepcion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.Diaexcepcion[idDiaExcepcion=" + idDiaExcepcion + "]";
    }

}
